package com.hmys.api.service.impl;

import com.hmys.api.mapper.WebMessageMapper;
import com.hmys.api.model.WebMessage;
import com.hmys.api.service.WebMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * Created by chen365 on 2018/03/28.
 */
@Service
public class WebMessageServiceImpl implements WebMessageService {
    @Autowired
    private WebMessageMapper webMessageMapper;

    @Override
    public int save(WebMessage record) {
        record.setCreateTime(new Date());
        record.setIsView(false);
        record.setStatus(true);
        return webMessageMapper.insertSelective(record);
    }
}
